
#define	SF_USER_ID				"SEIN"
#define	SF_USER_ID_SIZE		4

#define	SF_USER_ID_ADDR			0
#define	SF_BT_DEVICE_ADDR		0
#define	SF_PHONEBOOK_ADDR		4096
#define	SF_PAGE_SIZE	256
#define	SF_SECTOR_SIZE	4096

#define	SF_MANUF_ID_WINBOND				0xEF
#define	SF_DEVICE_ID_W25X05CL			0x05	// 512K-Bit
#define	SF_DEVICE_ID_W25X10CL			0x10	// 1M-Bit
#define	SF_DEVICE_ID_W25X20CL			0x11	// 2M-Bit

#define	SF_INS_WRITE_ENABLE				0x06
#define	SF_INS_WRITE_ENABLE_VOLATILE	0x50
#define	SF_INS_WRITE_DISABLE			0x04
#define	SF_INS_READ_STATUS				0x05
#define	SF_INS_WRITE_STATUS				0x01
#define	SF_INS_READ_DATA				0x03
#define	SF_INS_FAST_READ				0x0B
#define	SF_INS_FAST_READ_DUAL_OUPUT		0x3B
#define	SF_INS_FAST_READ_DUAL_IO		0xBB
#define	SF_INS_PAGE_PROGRAM				0x02
#define	SF_INS_SECTOR_ERASE_4K			0x20
#define	SF_INS_BLOCK_ERASE_32K			0x52
#define	SF_INS_BLOCK_ERASE_64K			0xD8
#define	SF_INS_CHIP_ERASE				0xC7	// 0x60
#define	SF_INS_POWER_DOWN				0xB9
#define	SF_INS_RELEASE_POWER_DOWN		0xAB
#define	SF_INS_DEVICE_ID				0x90
#define	SF_INS_DEVICE_ID_DUAL			0x92
#define	SF_INS_JEDEC_ID					0x9F
#define	SF_INS_READ_UNIQUE_ID			0x4B

#define	SF_TX_DATA_SIZE	512
#define	SF_RX_DATA_SIZE	256

#define	SF_SEQ_CHECK_ID		0
#define	SF_SEQ_CHECK_STATUS	1
#define	SF_SEQ_READ_STATUS		2
#define	SF_SEQ_CHECK_USERID	3
#define	SF_SEQ_READ_USERID		4
#define	SF_SEQ_READY			5
#define	SF_SEQ_TEST_READ		6
#define	SF_SEQ_TEST_WRITE		7
#define	SF_SEQ_TEST_CONFIRM	8
#define	SF_SEQ_ERASE_ALL		9
#define	SF_SEQ_ERASE_WAIT		10
#define	SF_SEQ_WRITE_USERID		11

#define	SF_SEQ_IDLE				0
#define	SF_SEQ_WRITE			1
#define	SF_SEQ_WRITE_END		2
#define	SF_SEQ_WRITE_HOLD		3
#define	SF_SEQ_WRITE_WAIT		4
#define	SF_SEQ_WRITE_START		5
#define	SF_SEQ_READ				6
#define	SF_SEQ_ERASE_BLOCK_SET	7
#define	SF_SEQ_ERASE_BLOCK_WAIT	8
#define	SF_SEQ_ERASE_PHONE_DATA		9
#define	SF_SEQ_ERASE_PHONE_DATA_WAIT	10
#define	SF_SEQ_PHONE_DATA_READ			11
#define	SF_SEQ_PHONE_DATA_READ_NEXT			12
#define	SF_SEQ_PHONE_DATA_READ_COMPLETE		13

#define	SF_SEQ_ERASE_BLOCK		14



